//
//  UserPageManager.h
//  JiuKuGospel
//
//  Created by jiukuyinyue on 15-8-10.
//  Copyright (c) 2015年 JiuKuForApp. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LCSingleton.h"

#define _UserM ([UserPageManager sharedInstance])
#define LOGINSUCCESSFUL @"LOGINSUCCESSFUL"

@class UserPageViewController;
@interface UserPageManager : NSObject

@property (nonatomic, strong)UserPageViewController * userPageVC;

@property (nonatomic, assign)BOOL isLogin;
@property (nonatomic, strong)NSString * userName;
@property (nonatomic, strong)NSString * userImageUrl;
@property (nonatomic, strong)NSString * userID;
@property (nonatomic, strong)NSString * usercode;           //用户识别码
@property (nonatomic, copy)NSString * mobileNum;           //手机号码
@property (nonatomic, copy)NSString * credit;//福音数量


@property (nonatomic, strong)NSString * mbcode_md5;
@property (nonatomic, strong)NSString * groupid;            //用户等级
@property (nonatomic, strong)NSString * salt;               //密码状态
@property (nonatomic, strong)NSString * play_notenjoy;      //允许播放不喜欢的歌曲
@property (nonatomic, strong)NSString * play_qlty;          //播放音质
@property (nonatomic, strong)NSString * signin;             //签到状态
@property (nonatomic, strong)NSString * qiandao;            //签到
@property (nonatomic, strong)NSMutableDictionary * qiandaoDic;            //签到new

@property (nonatomic, assign)NSInteger countHS;


@property (nonatomic, strong)NSString * WIFIStr;            //是否仅wifi下联网
@property (nonatomic, strong)NSString * playLoveStr;        //允许播放不喜欢歌曲
@property (nonatomic, strong)NSString * musicYinzhi;        //播放音质
@property (nonatomic, assign)BOOL isWIFIPlay;         //根据是否联网控制播放


@property (nonatomic, assign)BOOL isUpdate;     //是否切换歌曲数据

//加密
@property (nonatomic, strong)NSString * accesskey;            //授权加密key
@property (nonatomic, strong)NSString * times;            //授权加密时间戳


INTERFACE_SINGLETON(UserPageManager)

- (void)saveUserMessages;
- (void)getUserMessages;
- (void)clearUserMessages;


//获取加密字符串
- (void)hmacSHA256ShouQuanJiamiWithUserCode:(NSString *)userCode;
- (NSString *)hmac:(NSString *)data withKey:(NSString *)key;

- (NSString*)dictionaryToJson:(NSDictionary *)dic;
@end
